<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="entitybean.oc_station_ice.EntityBeanOc_Station_Ice;"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
List<EntityBeanOc_Station_Ice> list=(List<EntityBeanOc_Station_Ice>)request.getAttribute("list");
String o="yes";
String xmldate=(String)request.getAttribute("xmldate");
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">

		<title>显示站点信息</title>
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

	</head>

	<body>
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
			<%for(int i=0;i<list.size();i++)
	{
		%>
			<tr>
				<td height="32">

					<% if(o=="yes")
  {%>
					<input name="oc_station" type="checkbox" id="oc_station"
						checked="checked"  value="<%=list.get(i).getId()%>"/>
					<%
  out.write(list.get(i).getStation_name());
  }%>
					<%
			if(i<list.size()-1)
			{
				i=i+1;
				}else{o="not"; }

			
			%>
				</td>
				<td>
					<%
  if(o=="yes")
  {%>
					<input name="oc_station" type="checkbox" id="oc_station"
						checked="checked" value="<%=list.get(i).getId()%>"/>
					<%
  out.write(list.get(i).getStation_name());
  }%>
					<%
			if(i<list.size()-1)
			{
				i=i+1;
				}else{o="not"; }

			
			%>
				</td>
				<td>
					<% if(o=="yes")
  {%>
					<input name="oc_station" type="checkbox" id="oc_station"
						checked="checked" value="<%=list.get(i).getId()%>"/>
					<%
  out.write(list.get(i).getStation_name());
  }%>
					<%
			if(i<list.size()-1)
			{
				i=i+1;
				}else{o="not"; }

			
			%>
				</td>
				<td>
					<% if(o=="yes")
  {
	  %>
					<input name="oc_station" type="checkbox" id="oc_station"
						checked="checked" value="<%=list.get(i).getId()%>"/>
					<% 
  out.write(list.get(i).getStation_name());
  }%>
					<%
			if(i<list.size()-1)
			{
				i=i+1;
				}else{o="not"; }

			
			%>
				</td>
				<td>
					<% if(o=="yes")
  {%>
					<input name="oc_station" type="checkbox" id="oc_station"
						checked="checked" value="<%=list.get(i).getId()%>"/>
					<%
  out.write(list.get(i).getStation_name());
  }%>
					<%
			if(i<list.size()-1)
			{
				i=i+1;
				}else{o="not"; }

			
			%>
				</td>
				<td>
					<% if(o=="yes")
  {%>
					<input name="oc_station" type="checkbox" id="oc_station"
						checked="checked" value="<%=list.get(i).getId()%>"/>

					<%
  out.write(list.get(i).getStation_name());
  }%>
					<%
			if(i<list.size()-1)
			{
				i=i+1;
				}else{o="not"; }

			
			%>
				</td>
				<td>
					<% if(o=="yes")
  {
	  %>
					<input name="oc_station" type="checkbox" id="oc_station"
						checked="checked" value="<%=list.get(i).getId()%>"/>
					<%
  out.write(list.get(i).getStation_name());
  }%>
					<%
			if(i<list.size()-1)
			{
				i=i+1;
				}else{o="not"; }

			
			%>
				</td>
				<td>
					<% if(o=="yes")
  {%>
					<input name="oc_station" type="checkbox" id="oc_station"
						checked="checked" value="<%=list.get(i).getId()%>"/>
					<%
  out.write(list.get(i).getStation_name());
  }
  %>
					<%
			if(i<list.size()-1)
			{
				i=i+1;
				}else{o="not"; }

			
			%>
				</td>
				<td>
					<% if(o=="yes"){%><input name="oc_station" type="checkbox"
						id="oc_station" checked="checked" value="<%=list.get(i).getId()%>"/>
					<%
  out.write(list.get(i).getStation_name());
  }%>
					<%
			if(i<list.size()-1)
			{
				i=i+1;
				}else{o="not"; }

			
			%>
				</td>
				<td>
					<% if(o=="yes"){%><input name="oc_station" type="checkbox"
						id="oc_station" checked="checked" value="<%=list.get(i).getId()%>"/>
					<%
  out.write(list.get(i).getStation_name());
  }%>
					<%
			if(i<list.size()-1)
			{
				i=i+1;
				}else{o="not"; }

			
			%>
				</td>
				<td>
					<% if(o=="yes"){%><input name="oc_station" type="checkbox"
						id="oc_station" checked="checked" value="<%=list.get(i).getId()%>"/>
					<%
  out.write(list.get(i).getStation_name());
  }%>
					<%
			if(i<list.size()-1)
			{
				i=i+1;
				}else{o="not"; }

			
			%>
				</td>
				<td>
					<% if(o=="yes")
  {%><input name="oc_station" type="checkbox" id="oc_station"
						checked="checked" value="<%=list.get(i).getId()%>"/>
					<% 
					
 		 out.write(list.get(i).getStation_name());
  				}%>
	<%
			if(i<list.size()-1)
			{
				i=i+1;
				}else
				{
				o="not";
				 }

			%>
				</td>
			</tr>
		<%
		} %>
		</table>
<%xmldate="<chart  labelDisplay='NONE' caption='站点地图' yAxisName='维度'"
+" bgSWF='map-stations.jpg' canvasBgAlpha='10' canvasBorderColor='333333' canvasBorderThickness='0' divLineColor='333333'" 
+"xAxisName='经度' xAxisMaxValue='150'  xAxisMinValue='-90' yAxisMaxValue='50' yAxisMinValue='-80'>" 
+"  <categories  verticalLineThickness='1'>  " 
+"   <category label='90W' x='-90' showVerticalLine='1'/>"
+"   <category label='60W' x='-60' showVerticalLine='1'/>"
+"   <category label='30W' x='-30' showVerticalLine='1'/>"
+"   <category label='0' x='0' showVerticalLine='1'/>"
+"   <category label='30E' x='30' showVerticalLine='1'/>"
+"   <category label='60E' x='60' showVerticalLine='1'/>"
+"   <category label='90E' x='90' showVerticalLine='1'/>"
+"   <category label='120E' x='120' showVerticalLine='1'/>"
+"   <category label='150E' x='150' showVerticalLine='1'/>"
+"	 </categories> ";
for(int i=0;i<list.size();i++)
{
String l=list.get(i).getLongitude();
String l1=l.substring(0,1);
Integer lvl=2;
if(l.indexOf("'")!=-1)
{
	lvl=l.indexOf("'");
}
String lv=l.substring(2,lvl);
if(lv.equals(""))
{
	lv="0";

}
if(l1.equals("W"))
{
	lv="-"+lv;
}
String d=list.get(i).getDimensionality();

String d1=d.substring(0,1);
Integer dvl=2;
if(d.indexOf("'")!=-1)
{
	dvl=d.indexOf("'");
}
String dv=d.substring(2,dvl);
if(dv.equals(""))
{
	dv="0";

}
if(d1.equals("S"))
{
	dv="-"+dv;
}


System.out.println("l="+l);
System.out.println("l1="+l1);
System.out.println("lv="+lv);
System.out.println("d="+d);
System.out.println("d1="+d1);
System.out.println("dv="+dv);
xmldate=xmldate+"<dataset seriesName='"+list.get(i).getStation_name()+"' color='0000FF' anchorSides='4' anchorRadius='3' anchorBgColor='D5FFD5' anchorBorderColor='0000FF'><set y='"+lv+"' x='"+dv+"'/></dataset>";
}
xmldate=xmldate+"</chart>";
System.out.println("xmldate="+xmldate);



 %>

		<iframe id="ifm1"  height="700px" name="ifm1" src="show_map.jsp?xmldate=<%=xmldate%>" frameborder="0" marginheight="0"  marginwidth="0" scrolling="auto"  width="100%"></iframe>
	</body>
</html>
